<?php
class M_admin extends Model {

    function M_admin()
    {
        parent::Model();
    }

    function get_semua_admin() {
        $data = array();
        $this->db->order_by('id_admin');
        $q = $this->db->get('tb_admin');
        if($q->num_rows() > 0) {
            foreach ($q->result_array() as $row) {
				$data[] = $row;
            }
        }

        $q->free_result();
        return $data;
    }
    
}

?>
